# vim: filetype=yaml sw=2
version: '[% c("abbrev") %]'
filename: 'firefox-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %]'
git_hash: 'tor-browser-[% c("var/firefox_version") %]-[% c("var/torbrowser_branch") %]-1-build1'
tag_gpg_id: 1
git_url: https://git.torproject.org/tor-browser.git
gpg_keyring: torbutton.gpg

var:
  firefox_platform_version: 52.8.0
  firefox_version: '[% c("var/firefox_platform_version") %]esr'
  torbrowser_branch: 8.0
  torbrowser_update_channel: alpha
  copyright_year: '[% exec("git show -s --format=%ci").remove("-.*") %]'
  deps:
    - build-essential
    - unzip
    - zip
    - autoconf2.13
    - yasm
    - python
  container:
    use_container: 1

targets:
  release:
    var:
      torbrowser_update_channel: release

  nightly:
    git_hash: 'tor-browser-[% c("var/firefox_version") %]-[% c("var/torbrowser_branch") %]-1'
    tag_gpg_id: 0
    var:
      torbrowser_update_channel: default

  linux:
    var:
      arch_deps:
        - libgtk2.0-dev
        - libdbus-glib-1-dev
        - libxt-dev
        - hardening-wrapper
        # To pass configure since ESR 31.
        - libpulse-dev
        # To pass configure since ESR 45.
        - libgconf2-dev
        # To pass configure since ESR 52
        - libx11-xcb-dev
        # We built GCC but not the libmpc2, thus we need to install it
        - libmpc2
  linux-x86_64:
    var:
      martools_filename: mar-tools-linux64.zip

  linux-i686:
    var:
      martools_filename: mar-tools-linux32.zip

  linux-arm:
    var:
      martools_filename: mar-tools-linuxarm.zip
      arch_deps:
        # Based on configure errors observed with no extra deps:
        #- 'libx11-xcb1:armhf'
        #- 'libxcb-shm0:armhf'
        #- 'libxext6:armhf'
        #- 'libxt6:armhf'
        # Based on deps installed for x86:
        #- 'libgtk2.0-dev'
        #- 'libgtk2.0-0:armhf'
        #- 'libdbus-glib-1-dev'
        #- 'libdbus-glib-1-2:armhf'
        #- 'libxt-dev'
        #- 'hardening-wrapper'
        # To pass configure since ESR 31.
        #- 'libpulse-dev'
        # To pass configure since ESR 45.
        #- 'libgconf2-dev'
        # To pass configure since ESR 52
        #- 'libx11-xcb-dev'
        # We built GCC but not the libmpc2, thus we need to install it
        #- 'libmpc2'
        # Attempt to use debootstrap to get the needed deps
        #- libgtk2.0-dev
        #- libdbus-glib-1-dev
        #- libxt-dev
        #- hardening-wrapper
        # To pass configure since ESR 31.
        #- libpulse-dev
        # To pass configure since ESR 45.
        #- libgconf2-dev
        # To pass configure since ESR 52
        #- libx11-xcb-dev
        # We built GCC but not the libmpc2, thus we need to install it
        #- libmpc2
        #- debootstrap
        #- qemu-user-static
        #- fakeroot
        # Attempt to use apt-get download to get the needed deps
        - libgtk2.0-dev
        - libdbus-glib-1-dev
        - libxt-dev
        - hardening-wrapper
        # To pass configure since ESR 31.
        - libpulse-dev
        # To pass configure since ESR 45.
        - libgconf2-dev
        # To pass configure since ESR 52
        - libx11-xcb-dev
        # We built GCC but not the libmpc2, thus we need to install it
        - libmpc2
        - apt-rdepends

  osx-x86_64:
    var:
      martools_filename: mar-tools-mac64.zip
      arch_deps:
        - rsync

  windows-i686:
    var:
      martools_filename: mar-tools-win32.zip

  windows-x86_64:
    var:
      martools_filename: mar-tools-win64.zip

input_files:
  - project: container-image
  - name: '[% c("var/compiler") %]'
    project: '[% c("var/compiler") %]'
  - name: gcc-cross
    project: gcc-cross
    enable: '[% c("var/linux-arm") %]'
  - filename: get-moz-build-date
  - filename: 'mozconfig-[% c("var/osname") %]'
    name: mozconfig
  - project: binutils
    name: binutils
    enable: '[% c("var/linux") %]'
  - project: selfrando
    name: selfrando
    enable: '[% c("var/linux") && ! c("var/release") %]'
  - filename: fix-info-plist.py
    enable: '[% c("var/osx") %]'
  - URL: https://people.torproject.org/~gk/mirrors/sources/msvcr100.dll
    sha256sum: 8793353461826fbd48f25ea8b835be204b758ce7510db2af631b28850355bd18
    enable: '[% c("var/windows-i686") %]'
  - URL: https://people.torproject.org/~boklm/mirrors/sources/msvcr100-x86_64.dll
    sha256sum: ae3cb6c6afba9a4aa5c85f66023c35338ca579b30326dd02918f9d55259503d5
    enable: '[% c("var/windows-x86_64") %]'
  - project: gcc
    name: gcc
    enable: '[% c("var/windows") %]'
  - filename: STL_win64.patch
    enable: '[% c("var/windows-x86_64") %]'
  - filename: jsnativestack_unistd_armhf.patch
    enable: '[% c("var/linux-arm") %]'
